﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Tui
{
    public static class Enumerable
    {
        public static IEnumerable<Join<T, T0>> Join<T, T0>(this IEnumerable<T0> enumerable, string indexName, Func<T0, object> keyProvider)
            where T : BusinessObject<T>, new()
        {
            return BusinessObject<T>.Read(enumerable, indexName, keyProvider);
        }

        public static void Save<T>(this IEnumerable<T> enumerable) where T : BusinessObject<T>, new()
        {
            BusinessObject<T>.Save(enumerable);
        }

        public static void Delete<T>(this IEnumerable<T> enumerable) where T : BusinessObject<T>, new()
        {
            BusinessObject<T>.Delete(enumerable);
        }

    }




}
